package com.sunny.myproject.core.base.service;

import java.util.List;

import org.hibernate.criterion.Criterion;

public interface BaseService<T> {

	public void save(T t);

	public void delete(T t);

	public void deleteById(Long id);

	public void deleteByIds(Long[] ids);

	public List<T> list(List<Criterion> criterions);

	public T findById(Long id);

	public List<T> find(List<Criterion> criterions, int firstResult, int maxResults);

	public Integer num(List<Criterion> criterions);
	
	public Object queryHql(String hql);
}
